﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎登录后台管理系统--模板之家 www.cssmoban.com</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />

</head>

<body style="background-color:#1c77ac; background-image:url(images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">



    <div id="mainBody">
      <div id="cloud1" class="cloud"></div>
      <div id="cloud2" class="cloud"></div>
    </div>  


<div class="logintop">    
    <span>欢迎登录后台管理界面平台</span>    
    <ul>
    <li><a href="#">回首页</a></li>
    <li><a href="#">帮助</a></li>
    <li><a href="#">关于</a></li>
    </ul>    
    </div>
    
    <div class="loginbody">
    
    <span class="systemlogo"></span> 
       
    <div class="loginbox">

        <form action="#" method="post" id="sellerLoginForm" id="form">
            <ul>
                <li><input name="sellerId" type="text" class="loginuser" placeholder="admin"/></li>
                <li><input name="password" type="text" class="loginpwd" placeholder="密码" /></li>
                <li><input id="sellerLogin" type="button" class="loginbtn" placeholder="登录"  onclick="login()"/>
                    <label><input name="" type="checkbox" value="" checked="checked" />记住密码</label>
                    <label><a href="#">忘记密码？</a></label></li>
                <li><span id="sellerLoginSpan"></span></li>
            </ul>
        </form>
    
    </div>
    
    </div>

    <div class="loginbm">版权所有  2013  .com 仅供学习交流，勿用于任何商业用途</div>
</body>
</html>

<script src="/js/jquery.js"></script>
<script>
    $(function(){
        $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
        $(window).resize(function(){
            $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
        })
    });

    function login(){

        $.ajax({
            //请求的url
            url: "/seller/login",
            //请求的参数
            data: $("#sellerLoginForm").serialize(),
            //请求的方式
            type: "get",
            //预期的返回类型
            dataType: "json",
            //
            success: function (data) {
                if (data.status==200){
                    $("#sellerLoginSpan").html(data.msg)
                    window.location.href="main.html";
                }else {
                    $("#sellerLoginSpan").html(data.msg)
                }
            }
        })

    }
/*    $("#sellerLogin").click(function (){

        $.ajax({
            //请求的url
            url: "/seller/login",
            //请求的参数
            data: $("#sellerLoginForm").serialize(),
            //请求的方式
            type: "get",
            //预期的返回类型
            dataType: "json",
            //
            success: function (data) {
                if (data.status==200){
                    alert("查询成功")
                    $("#sellerLoginSpan").html(data.msg)

                   /!* window.location.href="left.html";
                    window.event.returnValue=false;*!/
                    document.getElementById("form").submit();

                }else {
                    $("#sellerLoginSpan").html(data.msg)
                }
            }
        })

    })*/
</script>